package com.linkhub.oms.admin.modules.order.domain.param;

import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * @Description: OrderLogisticParam
 * @Author: echo
 * @Date: 2024/5/25 10:49
 * @Version: 1.0
 */
@Data
public class OrderLogisticParam implements Serializable {

    @NotBlank(message = "channelCode is not Blank")
    @ApiModelProperty("渠道编码")
    private String channelCode;

    @NotBlank(message = "estimatedFreight is not Blank")
    @ApiModelProperty("预估运费")
    private String estimatedFreight;

    @NotBlank(message = "registrationFreight is not Blank")
    @ApiModelProperty("对外挂号费")
    private String registrationFreight;

    private List<String> sysOrderId;

    public static OrderLogisticParam createResetParam(String sysOrderId) {

        return createResetParam(Lists.newArrayList(sysOrderId));

    }

    public static OrderLogisticParam createResetParam(List<String> sysOrderIds) {
        OrderLogisticParam param = new OrderLogisticParam();
        param.setChannelCode("");
        param.setEstimatedFreight("");
        param.setRegistrationFreight("");
        param.setSysOrderId(sysOrderIds);
        return param;

    }

}
